//导入request.js请求工具类
import request from "@/utils/request";
//创建家庭
export const createFamilyService = () => {
  return request.get("/family/create");
};
//查看家庭成员
export const getFamilyMembersService = () => {
  return request.get("/family/member");
};
//邀请家庭成员
export const inviteFamilyMemberService = (data) => {
  return request.post("/family/invite", data);
};
//停止家庭共享
export const stopFamilyShareService = () => {
  return request.get("/family/stop");
};
//删除家庭成员
export const deleteFamilyMemberService = (id) => {
  return request.get("/family/delete/" + id);
};
//获取本人的家庭角色
export const getFamilyRoleService = () => {
  return request.get("/family/role");
};
//创建儿童账户
export const createChildAccountService = (data) => {
  return request.post("/family/createChild", data);
};
// 获取用户健康信息
export const getUserHealthInfoService = (userId) => {
  return request.get(`/user/healthInfo/` + userId);
};
